package com.basin.common.core.util;

import cn.hutool.core.lang.Tuple;

import java.util.ArrayList;
import java.util.List;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 * @date: 2025/5/14 20:46
 * @description:
 */
public final class PrintUtil {
    private PrintUtil() {
    }

    public static String tuplePrint(List<Tuple> tupleList) {
        List<String> list = new ArrayList<>();
        for (Tuple tuple : tupleList) {
            list.add(tuplePrint(tuple));
        }
        return String.join(",", list);
    }

    public static String tuplePrint(Tuple tuple) {
        return tuple.toString().replace("[", "")
                .replace("]", "")
                .replace(",", "=")
                .replace(" ", "")
                .trim();
    }
}
